package com.example.victory.swagger.model;

import com.fasterxml.jackson.annotation.JsonValue;

import com.fasterxml.jackson.annotation.JsonCreator;

/**
 * 客户类型，签约关系、服务关系、辅助服务关系、开发关系、融资融券开发关系、新业务推荐关系
 */
public enum CustomerType {
  
  SIGN("SIGN"),
  
  SERVICE("SERVICE"),
  
  SERVICE_ASSIST("SERVICE_ASSIST"),
  
  DEVELOP("DEVELOP"),
  
  DEVELOP_MARGIN("DEVELOP_MARGIN"),
  
  RECOMMEND("RECOMMEND");

  private String value;

  CustomerType(String value) {
    this.value = value;
  }

  @Override
  @JsonValue
  public String toString() {
    return String.valueOf(value);
  }

  @JsonCreator
  public static CustomerType fromValue(String text) {
    for (CustomerType b : CustomerType.values()) {
      if (String.valueOf(b.value).equals(text)) {
        return b;
      }
    }
    return null;
  }
}

